import { get, post } from '@/utils/request'

export function getList(params) {
  return get('/ht/enterpriseList.json',
    params)
}
// 获取企业列表
export function getEnterprise(params) {
  return get('/ht/prefixList.json',
    params)
}
// 删除企业列表
export function delEnterprise(id) {
  return post('/ht/delPrefix.json',
    { id: id })
}
// 企业详情
export function enterpriseDetail(id) {
  return get('/ht/entInfo.json', { prefix: id })
}
// 托管详情
export function truseeshipDetail(id) {
  return get('/ht/entTrusteeship.json', { id: id })
}
// 支付详情
export function chargeDetail(id) {
  return get('/ht/entPayOrder.json', { id: id })
}

export function productList(params) {
  return get('/ht/productList.json',
    params)
}

export function productAdd(params) {
  return post('/ht/productAdd.json',
    params)
}

// 获取账号信息
export function nodeInfo(entId) {
  return get('/ht/nodeInfo.json', { entId: entId })
}
// 前缀通过
export function prefixAudit(params) {
  return post('/ht/changeEntStatus.json', params)
}
// 顶级通过
export function prefixHeadAudit(params) {
  return post('/ht/enterprise/topAccess', params)
}
export function enterpriseAudit(params) {
  return post('/ht/enterpriseAudit.json', params)
}
export function enterpriseRefuse(params) {
  return post('/ht/enterpriseRefuse.json', params)
}

export function getType(params) {
  return get('/ht/getEntType.json')
}
export function enterAdd(params) {
  return post('/ht/prefixModify.json', params)
}
export function chargeAdd(params) {
  return post('/ht/chargesAdd.json', params)
}
// �շѽӿ�
export function chargeList(params) {
  return get('/ht/chargesList.json', params)
}
export function getArea(params) {
  return get('/ht/getAreaById.json', params)
}
export function enterPrefix(enterpriseId, identificationId) {
  return post('/ht/assignPrefix.json', { enterpriseId: enterpriseId, identificationId: identificationId })
}
export function listByCodeId(codeId) {
  return get('/ht/listByCodeId.json', { codeId: codeId })
}

export function detail(id) {
  return get('/ht/enterpriseDetail.json', { id: id })
}
export function productDel(id) {
  return post('/ht/productDel.json', { id: id })
}
